﻿@model  PMKB_Web.Models.LinkAddOrEditMVC

@{
    ViewBag.Title = @PMKB_DAL.PMKBEntities_resource.Link_Edit_Page_Title_Param(Model.link.LinkName);
}

<h2>@PMKB_DAL.PMKBEntities_resource.Link_Edit_Param(Model.link.LinkName)</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Edit Link</legend>

        <div class="editor-label">
            @Html.HiddenFor(model => model.link.LinkID)
        </div>
        
        <div class="editor-label">
            @PMKB_DAL.PMKBEntities_resource.Link_LinkName_Label
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.link.LinkName)
            @Html.ValidationMessageFor(model => model.link.LinkName)
        </div>

        <div class="editor-label">
            @PMKB_DAL.PMKBEntities_resource.Link_LinkDescription_Label
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.link.LinkDescription)
            @Html.ValidationMessageFor(model => model.link.LinkDescription)
        </div>

        <div class="editor-label">
            @PMKB_DAL.PMKBEntities_resource.Link_LinkUrl_Label
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.link.LinkUrl)
            @Html.ValidationMessageFor(model => model.link.LinkUrl)
        </div>
        <p>
        @Html.ListBoxFor(model => model.IDSelectedTags, Model.TagsMVC, new { @class = "chzn-select" })
        <a href="javascript:AddNewTag('@ViewData.TemplateInfo.GetFullHtmlFieldId("IDSelectedTags")')">
        @PMKB_DAL.PMKBEntities_resource.Link_AddNew
        </a>
        </p>
        <p>
            <input type="submit" value="@PMKB_DAL.PMKBEntities_resource.Link_Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink(PMKB_DAL.PMKBEntities_resource.Link_List_Page_Title , MVC.Home.Index())
</div>
